<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</h:head>

<h:body>
	<ui:composition template="/WEB-INF/facelets/template2.xhtml">
		<ui:define name="body">
			<f:view>
				<p:ajaxStatus onstart="PF('statusDialog').show()"
					onsuccess="PF('statusDialog').hide()" />
				<p:dialog modal="true" widgetVar="statusDialog" header="Loading"
					draggable="false" closable="false">
					<p:graphicImage
						value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/images/ajaxloadingbar.gif" />
				</p:dialog>
				<h:form id="formDialog">
					<p:messages id="msg" />
					<p:growl id="men" />
					<p:panel id="panelUsuarios" header="Registro">
						<h:panelGrid columns="2" id="panelGrid">
							
							<h:outputText id="msgCodigoUsua" value="CodigoUsua" />
							<p:inputText id="txtCodigoUsua"
								binding="#{registrosView.txtCodigoUsua}">
								
							</p:inputText>
							
							<h:outputText id="msgNombre" value=" Nombre" />
							<p:inputText id="txtNombre" disabled="false"
								binding="#{registrosView.txtNombre}" />

							<h:outputText id="msgEmail" value=" Email" />
							<p:inputText id="txtEmail" disabled="false"
								binding="#{registrosView.txtEmail}">
								<f:validateRegex
									pattern="^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$" />

							</p:inputText>

							<h:outputText id="msgClave" value=" Clave" />
							<p:inputText id="txtClave" disabled="false"
								binding="#{registrosView.txtClave}" />
							
							<h:outputText id="msgEstadoRegistro" value=" EstadoRegistro" />
							<p:inputText id="txtEstadoRegistro" disabled="false"
								binding="#{registrosView.txtEstadoRegistro}" />
							
							<h:outputText id="msgUsuCrea" value=" UsuCrea" />
							<p:inputText id="txtUsuCrea" disabled="false"
								binding="#{registrosView.txtUsuCrea}" />
							
							<h:outputText id="msgUsuModifica" value=" UsuModifica" />
							<p:inputText id="txtUsuModifica" disabled="false"
								binding="#{registrosView.txtUsuModifica}" />
							
							<h:outputText id="msgCodigoRol_Roles" value=" CodigoRol_Roles" />
							<p:inputText id="txtCodigoRol_Roles" disabled="false"
								binding="#{registrosView.txtCodigoRol_Roles}" />

							<h:outputText id="msgFechaCreacion" value=" FechaCreacion" />
							<p:calendar showOn="button" navigator="false" locale="en"
								binding="#{registrosView.txtFechaCreacion}">
								<p:ajax event="dateSelect"
									listener="#{registrosView.listener_txtFechaCreacion}" />
							</p:calendar>
							
							<h:outputText id="msgFechaModifcacion" value=" FechaModifcacion" />
							<p:calendar showOn="button" navigator="false" locale="en"
								binding="#{registrosView.txtFechaModifcacion}">
								<p:ajax event="dateSelect"
									listener="#{registrosView.listener_txtFechaModifcacion}" />
							</p:calendar>
						</h:panelGrid>
					</p:panel>
					<p:panel id="panelBotones">
						<div align="center">
							<p:commandButton id="btnSave" binding="#{registrosView.btnSave}"
								disabled="false" value="Save"
								action="#{registrosView.action_save()}"
								update="panelUsuarios,msg,panelBotones" />
							
							<p:commandButton id="btnClear" value="Clear"
								action="#{registrosView.action_clear()}"
								update="panelUsuarios,msg,panelBotones" />
						</div>
					</p:panel>
				</h:form>
			</f:view>
		</ui:define>
	</ui:composition>
</h:body>
</html>
